added code for the transitLength and duration