corrected logic for methods