it checks for both cases?