Added getPosition function