using refs instead of querying styling classes when adding behavior