impl library and stack depth