modifications following Xav s remarks ready to be merged