improved Test function
Improved Test()