removed unwanted functionality and fixed floating point exception