somewhat working, attributes needs parsing