Base logic