adding better func