release 0.6 modified for throw exception on wrong input