converted to pointers (initial funcionality working)