adds appropriate error handling for users defining the wrong method