finally working

still need to refactor for events