removed reflection and fixed other issues