added save functionality to module 2