Added lib code