updated formatting and added logic for user defined tests