Refactor for robustnes!