changed to make it compile and added test main