distributions work but could be modularlized better