Made more memory friendly