Added authors info, and removed duplicated code