added for loop with errors, need to check it out