added additional tests to make it more secure