various coding problems