Refactored as discussed in meeting