updated module with more functionality