Title: Security modelling using hierarchical state machines