with ajax call and attributes working