custom mouse implementation