Dynamic instead of static allocation