added tublr connection, simplified code