Finish all require function, might need to refact