Writing code for Line of Sight