changed fetchalls to fetchones