attempt at using underscore library… but it's too slow!