removed prints, changed return code