base code lib