fixed assert and print statements