added xy coord manipulation to custom kernel