Finally got working prototype