removed duplicate e.type call