Your use of 了 there is right.
USAGE OF 了
Roughly speaking, 了（non-stressed）includes two (or three) grammatical function words: 了1 and 了2.
了1 follows a verb(usually a transitive ) and means '(if) having done'; or follows an adjective', meaning 'comparing with other things or with itsself in a past or future time':
我这学期读了三十本书。I've read 30 books this school term.
这种新产品获得了普遍好评。This new product has won widespred praise.
这个苹果比那个小了许多。This apple is much smaller than that one.
水位比昨天低了0.2米。The water level is 0.2 meter lower than yesterday.
树叶儿红了。The leaves have turned red/The leaves are turning red【NOTE2】.
他比以前胖了许多。He has/had gathered much flesh than ever.
NOTE1: When 了1 is used following an intransitive verb or an adjective ( meaning something happed AGAIN AND AGAIN or a situation appeared AGAIN and AGAIN.And the antecedent Vi. and Adj. is urally monosyllable), it comes only in some repetitive or paralel constructions:
整天吃了睡，睡了吃，这样的生活真没意思。Eat and sleep, sleep and eat: living this way all the time cannot be more boring.
她数了又数，（数了又数），还是只有十五个！ She counted and counted, and yes, the number was still 15!
树叶儿绿了又黄，黄了又绿，一晃几年过去了。她早已做了人妻，又做了人母，而他仍然是孑然一身。The leaves had alternatively been green and yellow, yellow and green.Several years pasted in silence,without being noticed. She became a wife and then a mother,and he was still remaining single.