started implementing functions