added reduce and expand
argh makefile was messed up