Refactored a small piece, we might also need a decorator