renamed check function to getValue, added getAttribute()