cleaned up attributes script