add solve method
add output