updated with all the checks