revised functions