changed attributes and some code