added solution via normal equation