WIP
partial commit ,TODO: fix entities