Working main file for longitudinal