Added block and refactor