finished all functions