got required functionality working