moved lmb connection function into module
tidying up