Got rectangle selection tool working perfectly