removed method test()
else is sufficient in this case
removed unneccesary check