improve serilaizer implementation
add template load