refactor methode to functional style