Added reshape to general functions