code sending completely works