added meteor method and sync function