Working withou adding in threading functionality