formatted code, added test, added statics