Bit of a mess now but Ive somehow managed to make the same functionality of polygon-pie using less lines of code. what