added more function defs