added moving ground and portal, DISORGANIZED CODE