made check function