move the check to a controller function....