remove assert and if