Implemented line checking