Assigned codes to check function, added documentation.