changed parameters of case classes to not take duration