implementations of various design pattersn