fix sql bug, finished get stuff