first version of combined functions