contextParser function: additional performance improvement through bang patterns