using the normal equation formula