modified for testing