added getPosition function to Block