added coordinates for elements and touch events for elements, fixed issues with solver