move these around a bit
refactor this; might lose some efficiency, but probably better
starting to hook it together