some clever stuff in here. still feels like a spike though