modified gkern with library