moved rekursion to ap1