using crafty core API methods and function for entities