changed exception to boolean val to make flash message