removing double function - cleaning code