made ram size a functiona variable