add some safety / simplify