cleaning up code, removing unnecessary checks.