Worked on level sensor code