add cursor detection to edges