wrote and tested show function for attribute