algebric solution