fixing handling of previous attributes
fixing formating from inpout