added prepare method to modules