epsilon compare and proper kernel implementation