refactored code and added methods to
set and use the custom transition durations