started implenting check functionality