added get poll implementation
Made some SQL query changes