dynamically defining TOP