fixed invalid function call
using tilt compensation method, very hacky though