added inline for functions to avoid stack pointer bullshit