pass self to function; so weird