changed data types and pointer strategy