Added interface for applytopup