further devlopment for function