basic logic class and hooks setup