Added functions for sync