Added readPos function