messy but works, don't really understand why numbers display with so many decimal points, ended up calling round everywhere