- most functions were not static, but they should have been