minimal library implementation complete