added 'static' declaration to functiondefinitions