improve checking