Basic lib code