changed end to duration because of reserved word