retrieving result
returning result as list
changing some code to pass Flake8