amateur implementations of common data structures