fix method and add validation