changed position calculation
added positioning