changed till apply
finished functions chapter