moved filename function into redis