simplified ses, fixed include functions bug