trying to fix javascript
switch attempt
made the calculation function work
renamed the file