added ranking methods to database