algorithms and classes