first working version of saving markup