fixing methods code