Logic works, need some reshaping