adding checks and stuff