more refactoring. added alt,type,dur array