remove redundant database call