latex template now almost compatible with  class