WIP: added component save function