polls working. need to tidy up code a bit.