improve functionality by pair programming with Alireza