some fixes to code. may need to parseFloat by default