fixed bug in recommend; removed unused sql