added mouse on rect functions