checking for python version
fixed some warnings
remove some warnings