added alot of comments and a repeat test option