added req function and require libs