added more checks still needs work