update example, now it something that could be used in a real application