Restoring previous functions
Kind of cheating, by trying all multiplication combinations. Should have done some analysis first