implements a function with os module