Fixed code
Added save code