more functions + useful queries added