fixed the header for adding to pythonpath
added composition
fixed the n&(n-1)==0 problem