give buttons actions
refactor code including effects class