converted to liberator templates lib