moved parser and added rules table