added junit testing