moved code to trick class and implemented its use