finally got the modal sequence working