Added functions to get entities