Change function names and refactor its procesing