small refactor and givin more explicit name to function
small refactor