Added logic to take input and call save