finally debugged although sometimes when i have to type 'list' twice