still working on solve func