removed unused if name is __main__
added tests