add if/else logic to exit method calls for clarity