Adding loops and classes