spaceToScreen function added