modified recursive methods