renamed, added junit testing code