added a test, made some methods static