finished pseudo for ps4-2