Copied from parse_resource boilerplate code - working