Updated Code

Still need to add last check to the list