adding debugging, removing need to return object