Improved getAttributes