Writing code to only display entities on screen