add some input validation and dependency on stdlib