Made changes to include all the checks