working version without any leaks single list