get offset from query string