implements functionality with dom elements