moving parser method to the module for better reuse