moved

moved alert to above return line