some algorithms and datastructures