python does not like this code