added note about example, removed dynamic allocation