tests not done yet but code works