added border animation to rectangle