Add frame variable for easier calculation