Added implementation for top