remove element functionality