move malloc to execute (faster)