Subtracting gravity effect