add some convenience function to entity