addition bug corrected and lighter code