added aliasing and fixed compiler issues