Refactor to less block code