replace save fromArray with setting data manually

• for security reasons (injection?)
• cleanup code