fixing stupid type errors and list append bug from late-night coding