add tile click backend code