simplify function variables initialization