Simplified based on @ellerh's feedback (TO BE SQUASHED)