fix solution dim and beta starts from 1