move bio related functions to separate file