removed unnecessary code
fixed bug with attributes on new line