logic mistake/shifted things around