Implement RAM function