shouldn't this be moved to `attachEvents` ?