made minor changes in context recognition, check comments