api changes taken from tutero repo.. work in progress