separated back-end functions from DOM