added entity abstract and init functions