adding source with some attempt at fixing build warnings