add functions for last