fixed a bug from copy and pasting. it works but hasnt been thoroughly tested