add take turn function in firebase