add check in function