added common functions
ready to insert an algorithm