add more general solution