rebased source code and added conciens additions