move solve function to method
add gitignore