add lib and finish of core functionality