Logic is almost done