implemented controller useful query functions