implementation of basic classification algorythms