rewrote to use mass api, more changes to come