Refactor and added proper test