Building moduleReader function