restructure, added parse args