implemented offset for position