made a simple database
add some more functionality to the mapping alg with now actall backtrackng