This is working! but it's kind of a mess right now; have to clean it later.