fixed advanced functions