improved level checker