improved version
readded missing import