implemented first-fit algorithmus