Added code for auto testing