try to make dp with restrictions