solves #159 Maximum call stack size exceeded