more stuff but sql on browse page has repetition, need to fix sql query