now storing proper x coordinates of the edges
basic code for doing hit detection