refactored annontated function to save arguments