first not nice, but working angular version