code cleanup, added `public static` keyword to functions called statically