implement java std functions