added rules for begin and variable declaration