First version of analyze