Updated module to handle sync