removed rubbish from cursor statement