adds focus and scrollto function