all main functionality finished