abstract stdlib implementation, add documentation