added some bad logic