completed if statement and added message to handle improper commands