Updated lib to be more similar with other languages