move function to implementation