add basics for algorythm (working so sloooow)