updated for use with node to 0.10
fiddling around with mode modules