fixed issue with empty function