added ability to specify attributes and value for singular type element