static methods are preferred; bug with shared variables