basic algorythms prototyping