several python problems