many things implemented, but still a weird inf loop issue