changed atributes function to attribute