Refactor + fixed typo