added xpos initialiser