add logic and config