changed into interface and impl instead of static methods