adjusted imports depending on python version
fixes #1