modeling of behavioral sequence using lego formalism