updated for better serailization